clear all;
clc;

load mnist_knn_cos_sup;
n = size(nn,1);
d = 100;
for i = 3:9
    ds = dt(:,1:i);
    ds = 1-ds;
    L = knn2lap(nn(:,1:i),ds);
    A = sparse(1:n,1:n,1);
    L = L + A;
    [V,D] = eigs(L,d,'sm');
    DD = diag(D)-1;
    VV = V(:,d:-1:1);
    fname = [int2str(i),'nn_cos_wet_sup'];
    save(fname,'VV','DD');
end